package com.auxgroup.smarthome.business.service.inner;

import com.auxgroup.bridge.app.inner.vo.DeviceInfoNewVo;
import com.auxgroup.bridge.business.inner.vo.DeviceExportDataVo;
import com.auxgroup.bridge.business.inner.vo.DeviceListVo;
import com.auxgroup.smarthome.business.service.DeviceInnerServiceFallback;
import com.auxgroup.smarthome.utils.PageContent;
import com.auxgroup.smarthome.web.ApiResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: laiqiuhua.
 * @Date: 2017/8/16 17:30.
 */
@FeignClient(name="INNER-SERVICE", fallback = DeviceInnerServiceFallback.class)
public interface DeviceInnerService {

    @GetMapping("/inner/products/devices")
    ApiResponse<PageContent<DeviceListVo>> getDeviceList(@RequestParam(value = "modelId", required = false) String modelId, @RequestParam(value = "keywords", required = false) String keywords, @RequestParam(value = "deviceStatus", required = false) String deviceStatus, @RequestParam("page") Integer page, @RequestParam("size") Integer size);

    @GetMapping("/inner/products/devices/list")
    ApiResponse<List<DeviceListVo>> getDeviceListByNoPage(@RequestParam(value = "modelId", required = false) String modelId, @RequestParam(value = "keywords", required = false) String keywords, @RequestParam(value = "deviceStatus", required = false) String deviceStatus);

    @GetMapping("/inner/products/devices/export_data")
    ApiResponse<List<DeviceExportDataVo>> getDeviceExportData(@RequestParam(value = "modelId", required = false) String modelId, @RequestParam(value = "keywords", required = false) String keywords, @RequestParam(value = "deviceStatus", required = false) String deviceStatus);


    @GetMapping("/inner/products/devices/{deviceId}")
    ApiResponse<DeviceListVo> getDeviceDetail(@PathVariable("deviceId") String deviceId);

    @GetMapping("/inner/device_mac_info/{mac}")
    ApiResponse<DeviceInfoNewVo> getDeviceInfoNewVoByMac(@PathVariable("mac") String mac);


}
